﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="work0611.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            账号：<asp:TextBox ID="userName" runat="server"></asp:TextBox>
            <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="账号不能为admdin" ClientIDMode="AutoID" OnServerValidate="CustomValidator1_ServerValidate" ControlToValidate="userName" Display="Dynamic"></asp:CustomValidator>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="账号不能为空！" BorderStyle="NotSet" Display="Dynamic" ControlToValidate="userName"></asp:RequiredFieldValidator>
            <br/>
            密码：<asp:TextBox ID="password" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="密码不能为空！" ControlToValidate="password"></asp:RequiredFieldValidator>
            <br/>
            确认密码：<asp:TextBox ID="ConfirmPassword" runat="server"></asp:TextBox>
            <asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="两次密码不一致！" ControlToCompare="password" ControlToValidate="ConfirmPassword" Display="Dynamic"></asp:CompareValidator>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="确认密码不能为空！" ControlToValidate="ConfirmPassword" Display="Dynamic"></asp:RequiredFieldValidator>
            <br/>
            年龄：<asp:TextBox ID="age" runat="server"></asp:TextBox>
            <asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="年龄不在范围内！（0~100）" MaximumValue="100" MinimumValue="0" ControlToValidate="age" BorderStyle="NotSet" Display="Dynamic" Type="Integer"></asp:RangeValidator>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="年龄不能为空！" Display="Dynamic" ControlToValidate="age"></asp:RequiredFieldValidator>
            <br/>
            出生日期：<asp:TextBox ID="birthday" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="出生日期不能为空！" Display="Dynamic" ControlToValidate="birthday"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="格式错误！（19xx-xx-xx）" ControlToValidate="birthday" ValidationExpression="\d{4}-\d{2}-\d{2}" Display="Dynamic"></asp:RegularExpressionValidator>
            <asp:RangeValidator ID="RangeValidator2" runat="server" ErrorMessage="范围错误，范围为1900-01-01到系统当前时间" ControlToValidate="birthday" Display="Dynamic" MinimumValue="1900-01-01" Type="Date"></asp:RangeValidator>
            <br/>
            毕业日期：<asp:TextBox ID="GraduationTime" runat="server"></asp:TextBox><asp:CompareValidator ID="CompareValidator2" runat="server" ErrorMessage="毕业时间不能早于或等于出生时间！" ControlToCompare="birthday" ControlToValidate="GraduationTime" Operator="GreaterThan" Type="Date"></asp:CompareValidator>
            <br/>
            电子邮箱：<asp:TextBox ID="email" runat="server"></asp:TextBox>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="格式不正确！" ValidationExpression="^(\w|-)+@(\w+)\.(com|org|net|edu|mil|tv|biz|info)$" ControlToValidate="email" Display="Dynamic"></asp:RegularExpressionValidator>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ErrorMessage="电子邮箱不能为空!" Display="Dynamic" ControlToValidate="email"></asp:RequiredFieldValidator><br/>
            头像：<asp:FileUpload ID="ful" runat="server" />
           <br />
            <asp:Literal ID="Literal2" runat="server"></asp:Literal>
            <asp:Image ID="Image1" runat="server" />
            <br />
            <asp:Button ID="Button1" runat="server" Text="提交" OnClick="Button1_Click"  />
            <asp:Literal ID="Literal1" runat="server"></asp:Literal>
            <br />
            <asp:ValidationSummary ID="ValidationSummary1" runat="server" DisplayMode="SingleParagraph" ShowMessageBox="True" />
       
            
        
        </div>
    </form>
</body>
</html>
